package qianfeng.com.jswebproject;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class LocalActivity extends AppCompatActivity {
    private WebView mWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_local);
        initView();
        setData();

    }

    private void setData() {
        mWebView.setWebViewClient(new WebViewClient());
        mWebView.setWebChromeClient(new WebChromeClient());
        // 加载本地的html
        mWebView.loadUrl("file:///android_asset/demo.html");
    }

    private void initView() {
        mWebView = (WebView) findViewById(R.id.wv_local_test);
    }
}
